<div>
	<div id="${dialogId}_dialog" style='width: 700px;' data-dojo-type='ism.widgets.Dialog' data-dojo-attach-point='dialog'
		data-dojo-props='title: "${dialogTitle}", 
			instruction: "${dialogInstruction}",
			autofocus: false,
            onEnter: function() {
				if(!dijit.byId("${dialogId}_saveButton").get("disabled")) {
					dojo.publish("${dialogId}_saveButton", ""); 
				} 
			},  
            closeButtonLabel: "${nls.cancelButton}",
            buttons: [ new dijit.form.Button({ 
                label: "${nls.saveButton}",
                id: "${dialogId}_saveButton",
                onClick: function() { dojo.publish("${dialogId}_saveButton", ""); }
            }) ]'>

		<form id="${dialogId}_DialogForm" data-dojo-type="dijit.form.Form" data-dojo-attach-point="form">
			<div style='float: left; display: inline-block;' id='${dialogId}_leftGroup'>
                <div class='dialogField'>
                    <div class='idxLabel' id='${dialogId}_clusterMembershipStatusLabel' style='width: 207px; display: inline-block'>
                        <span style='padding: 0 7px'></span>
                        ${nls.clusterMembershipLabel}
                    </div>
                    <div id='${dialogId}_clusterMembershipStatus' data-dojo-attach-point='clusterMembershipStatus' style='display: inline-block'>${nls.notConfigured}</div>
                    <a class="actionLink" id="${id}_leaveLink" href="javascript:;" style="display:none" 
                        data-dojo-attach-point="leaveLink" data-dojo-attach-event="onclick:leave">${nls.leaveLink}</a><br />                    
                </div>
                <div class='dialogField'>                            
                    <div style='display:none; padding-right: 11px;' data-dojo-attach-point='enabledBlock'>
	                    <div class='idxLabel dijitInline' id='${dialogId}_enabled'
	                        style='width: 207px; display: inline-block;'>
	                        <span style='padding: 0 7px'></span>
	                        <span class='ismWidgetLabel'>${nlsm.messaging.endpoints.form.enabled}</span>            
	                    </div>                             
	                    <div id='${dialogId}_enabledState' data-dojo-type='idx.form.CheckBox' data-dojo-attach-point='field_EnableClusterMembership' aria-labelledby='${dialogId}_enabled'
	                        data-dojo-props='fieldWidth: "50px", checked: false'></div>
                    </div>
                </div>

                <div class='dialogField'>
                    <div id="${dialogId}_clusterName" data-dojo-type='ism.widgets.TextBox' data-dojo-attach-point='field_ClusterName'
                        data-dojo-props=' 
                        inputWidth: "15em",
                        label: "${clusterNameLabel}", 
                        tooltipContent: "${clusterNameTooltip}", 
                        required: true,
                        labelAlignment: "horizontal", 
                        labelWidth: "210"'></div>
                </div>
                <div class='dialogField'>
                    <div id="${dialogId}_controlAddress" data-dojo-type='ism.widgets.TextBox' data-dojo-attach-point='field_ControlAddress'
                        data-dojo-props=' 
                        inputWidth: "15em",
                        label: "${controlAddressLabel}", 
                        tooltipContent: "${controlAddressTooltip}", 
                        required: true,
                        pattern: "[a-zA-Z0-9\.:\-]+",
                        invalidMessage: "${addressInvalid}",
                        labelAlignment: "horizontal", 
                        labelWidth: "210"'></div>
                </div>
                
                <!-- Advanced section -->
                    <div id='${dialogId}_advancedSection' data-dojo-type='ism.widgets.ToggleContainer' 
                        class="dialogToggle" data-dojo-attach-point='advancedSection' 
                        data-dojo-props='title: "${advancedTitle}",
                            triggerId: "${triggerId}",
                            startsOpen: ${startsOpen}'>
                        <div class='toggleTarget toggleTargetIndent'>
                            <span class='tagline'>${nls.advancedSettingsTagline}</span><br /><br />
                            <div class='dialogField'>                            
                                <div style='display:inline-block; padding-right: 11px;'></div>
                                <div class='idxLabel dijitInline' id='${dialogId}_useMulticastDiscoveryLabel'
                                    style='width: 192px; display: inline-block;'>
                                    <span class='ismWidgetLabel'>${nls.useMulticastDiscoveryLabel}</span>            
                                    <div id="${dialogId}_useMulticastDiscovery_Hover" href="#bogus1"
                                        role="tooltip" style='display: inline-block' tabindex="0"
                                        class="ismWidgetHoverHelpIcon" aria-labelledby="${dialogId}_useMulticastDiscovery_Tooltip"
                                        onmouseover="idx.widget.HoverHelpTooltip.defaultPosition=['above', 'below']"></div>
                                    <span id="${dialogId}_useMulticastDiscovery_Tooltip"
                                        data-dojo-type="idx.widget.HoverHelpTooltip"
                                        data-dojo-props='connectId:["${dialogId}_useMulticastDiscovery_Hover"], forceFocus: true, showLearnMore:false'>${useMulticastTooltip}</span>
                                </div>                             
                                <div id='${dialogId}_useMulticastDiscovery' data-dojo-type='idx.form.CheckBox' data-dojo-attach-point='field_UseMulticastDiscovery' aria-labelledby='${dialogId}_useMulticastDiscoveryLabel'
                                    data-dojo-attach-event='onChange:changeUseMulticastDiscovery' data-dojo-props='fieldWidth: "50px", checked: true'></div>
                            </div>
                            <div class="childProperties"> <!-- fields only relevant when useMulticastDiscovery is checked -->
                                <div class='dialogField'>
                                    <div id='${dialogId}_discoveryPort' data-dojo-type='ism.widgets.TextBox' data-dojo-attach-point='field_DiscoveryPort'
                                        data-dojo-props='
                                        inputWidth: "6em",
                                        label: "${discoveryPortLabel}", 
                                        tooltipContent: "${discoveryPortTooltip}",
                                        required: true,
                                        invalidMessage: "${portInvalid}",
                                        pattern: "[\\d]+",
                                        labelAlignment: "horizontal",
                                        value: "${defaultDiscoveryPort}", 
                                        labelWidth: "185"'></div>
                                </div>
                                <div class='dialogField'>
                                    <div id='${dialogId}_multicastDiscoveryTTL' data-dojo-type='ism.widgets.TextBox' data-dojo-attach-point='field_MulticastDiscoveryTTL'
                                        data-dojo-props='
                                        inputWidth: "6em",
                                        label: "${multicastTTLLabel}", 
                                        tooltipContent: "${multicastTTLTooltip}",
                                        required: true,
                                        pattern: "[\\d]+",
                                        labelAlignment: "horizontal",
                                        value: "1", 
                                        labelWidth: "185"'></div>
                                </div>
                            </div>
                            <div class='dialogField'>
                                <div id='${dialogId}_joinClusterWithMembers' data-dojo-type='ism.widgets.TextBox' data-dojo-attach-point='field_DiscoveryServerList'
                                    data-dojo-props='
                                    inputWidth: "25em",
                                    label: "${withMembersLabel}", 
                                    tooltipContent: "${membersTooltip}",
                                    required: false,
                                    alignWithRequired: true,
                                    labelAlignment: "horizontal", 
                                    labelWidth: "210"'></div>
                            </div>
                            <div class='dialogField'>
                                <div id='${dialogId}_discoveryTime' data-dojo-type='ism.widgets.TextBox' data-dojo-attach-point='field_DiscoveryTime'
                                    data-dojo-props='
                                    inputWidth: "6em",
                                    label: "${discoveryTimeLabel}", 
                                    tooltipContent: "${discoveryTimeTooltip}",
                                    required: true,
                                    pattern: "[\\d]+",
                                    labelAlignment: "horizontal",
                                    value: "10", 
                                    unit: "${unit}",
                                    labelWidth: "210"'></div>
                            </div>                            
                            <div class="subsection" style="padding-top: 10px;"> 
                                <h3>${nls.controlInterfaceSectionTitle}
                                    <div style="display: inline-block; vertical-align: top;">
                                        <div id="${dialogId}_controlInterfaceSectionHover" href="#bogus1" role="tooltip"
                                            tabindex="0" class="hoverHelpIcon" aria-labelledby="${dialogId}_controlInterfaceSectionTooltip"
                                            onmouseover="idx.widget.HoverHelpTooltip.defaultPosition=['above', 'below']"></div>
                                        <span id="${dialogId}_controlInterfaceSectionTooltip"
                                            data-dojo-type="idx.widget.HoverHelpTooltip"
                                            data-dojo-props='connectId:["${dialogId}_controlInterfaceSectionHover"], forceFocus: true, showLearnMore:false'>${!controlInterfaceSectionTooltip}</span>
                                    </div>                                                     
                                </h3>
                                <div class='dialogField'>
                                    <div id='${dialogId}_controlPort' data-dojo-type='ism.widgets.TextBox' data-dojo-attach-point='field_ControlPort'
                                        data-dojo-props='
                                        inputWidth: "6em",
                                        label: "${portLabel}", 
                                        tooltipContent: "${controlPortTooltip}",
                                        required: true,
                                        invalidMessage: "${portInvalid}",
                                        pattern: "[\\d]+",
                                        labelAlignment: "horizontal",
                                        value: "${defaultControlPort}", 
                                        labelWidth: "210"'></div>
                                </div>
                                <div class='dialogField'>
                                    <div id="${dialogId}_controlExternalAddress" data-dojo-type='ism.widgets.TextBox' data-dojo-attach-point='field_ControlExternalAddress'
                                        data-dojo-props=' 
                                        inputWidth: "15em",
                                        label: "${externalAddressLabel}",
                                        tooltipContent: "${controlExternalAddressTooltip}", 
                                        required: false,
                                        alignWithRequired: true,
                                        pattern: "[a-zA-Z0-9\.:\-]+",
                                        invalidMessage: "${addressInvalid}",
                                        labelAlignment: "horizontal", 
                                        labelWidth: "210"'></div>
                                </div>
                                <div class='dialogField'>
                                    <div id='${dialogId}_controlExternalPort' data-dojo-type='ism.widgets.TextBox' data-dojo-attach-point='field_ControlExternalPort'
                                        data-dojo-props='
                                        inputWidth: "6em",
                                        label: "${externalPortLabel}",
                                        tooltipContent: "${controlExternalPortTooltip}", 
                                        required: false,
                                        alignWithRequired: true,
                                        invalidMessage: "${portInvalid}",
                                        pattern: "[\\d]+",
                                        labelAlignment: "horizontal",
                                        labelWidth: "210"'></div>
                                </div>
                            </div>
                            <div class="subsection"  style="padding-top: 10px;">                             
                                <h3>${nls.messagingInterfaceSectionTitle}
                                    <div style="display: inline-block; vertical-align: top;">
                                        <div id="${dialogId}_messagingInterfaceSectionHover" href="#bogus1" role="tooltip"
                                            tabindex="0" class="hoverHelpIcon" aria-labelledby="${dialogId}_messagingInterfaceSectionTooltip"
                                            onmouseover="idx.widget.HoverHelpTooltip.defaultPosition=['above', 'below']"></div>
                                        <span id="${dialogId}_messagingInterfaceSectionTooltip"
                                            data-dojo-type="idx.widget.HoverHelpTooltip"
                                            data-dojo-props='connectId:["${dialogId}_messagingInterfaceSectionHover"], forceFocus: true, showLearnMore:false'>${!messagingInterfaceSectionTooltip}</span>
                                    </div>                                                     
                                </h3>
                                <div class='dialogField'>
                                    <div id="${dialogId}_messagingAddress" data-dojo-type='ism.widgets.TextBox' data-dojo-attach-point='field_MessagingAddress'
                                        data-dojo-props=' 
                                        inputWidth: "15em",
                                        label: "${addressLabel}", 
                                        tooltipContent: "${messagingAddressTooltip}",
                                        required: false,
                                        alignWithRequired: true, 
                                        pattern: "[a-zA-Z0-9\.:\-]+",
                                        invalidMessage: "${addressInvalid}",
                                        labelAlignment: "horizontal", 
                                        labelWidth: "210"'></div>
                                </div>
                                <div class='dialogField'>
                                    <div id='${dialogId}_messagingPort' data-dojo-type='ism.widgets.TextBox' data-dojo-attach-point='field_MessagingPort'
                                        data-dojo-props='
                                        inputWidth: "6em",
                                        label: "${portLabel}", 
                                        tooltipContent: "${messagingPortTooltip}",
                                        required: true,
                                        invalidMessage: "${portInvalid}",
                                        pattern: "[\\d]+",
                                        labelAlignment: "horizontal",
                                        value: "${defaultMessagingPort}", 
                                        labelWidth: "210"'></div>
                                </div>
                                <div class='dialogField'>
                                    <div id="${dialogId}_messagingExternalAddress" data-dojo-type='ism.widgets.TextBox' data-dojo-attach-point='field_MessagingExternalAddress'
                                        data-dojo-props=' 
                                        inputWidth: "15em",
                                        label: "${externalAddressLabel}", 
                                        tooltipContent: "${messagingExternalAddressTooltip}",
                                        required: false,
                                        alignWithRequired: true, 
                                        pattern: "[a-zA-Z0-9\.:\-]+",
                                        invalidMessage: "${addressInvalid}",
                                        labelAlignment: "horizontal", 
                                        labelWidth: "210"'></div>
                                </div>
                                <div class='dialogField'>
                                    <div id='${dialogId}_messagingExternalPort' data-dojo-type='ism.widgets.TextBox' data-dojo-attach-point='field_MessagingExternalPort'
                                        data-dojo-props='
                                        inputWidth: "6em",
                                        label: "${externalPortLabel}",
                                        tooltipContent: "${messagingExternalPortTooltip}", 
                                        required: false,
                                        alignWithRequired: true, 
                                        invalidMessage: "${portInvalid}",
                                        pattern: "[\\d]+",
                                        labelAlignment: "horizontal", 
                                        labelWidth: "210"'></div>
                                </div>
                                 <div class='dialogField'>
                                    <div class='idxLabel' id='${dialogId}_useTLSLabel' style='width: 207px; display: inline-block'>
                                        <span style='padding: 0 7px'></span>
                                        ${nls.useTLSLabel}</div>
                                    <div id='${dialogId}_useTLS' data-dojo-type='idx.form.CheckBox' data-dojo-attach-point='field_MessagingUseTLS' aria-labelledby='${dialogId}_useTLSLabel'
                                        data-dojo-props='fieldWidth: "50px", checked: false'></div>
                                </div>
                            </div>
                        </div>
                    </div> <!-- end advanced section -->
			</div> <!-- end left section -->
			<div style='clear: both;'/>
		</form>
	</div>
</div>
